<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ImageManager.aspx.cs" Inherits="ImageManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>

    <script>
    function btnDelete_Click() {
	    a = window.confirm("Are you sure want to delete this Files ?");
	    if(a) {
		    return true;
	    }
	    else {
		    return false;
	    }
    	
    }
    function imgACL_Click(filename) {
	    alert(filename);
    	
    }
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <div>
            <b>
                <br>
                <br>
                <table class="FileManager_table" cellspacing="0" cellpadding="0" width="80%" border="0">
                    <tr bgcolor="#4e6ca4" height="20">
                        <td>
                            <font color="white" size="2"><b>File Manager</b> </font>
                        </td>
                    </tr>
                    <tr bgcolor="#d4d0c8">
                        <td>
                            <asp:ImageButton ID="btnGoUp" AlternateText="Up One Level" ImageUrl="images/back.gif"
                                runat="server"></asp:ImageButton><asp:ImageButton ID="btnDelete" AlternateText="Delete"
                                    ImageUrl="images/close.gif" runat="server"></asp:ImageButton></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:DataGrid ID="dgFile" runat="server" CellSpacing="0" CellPadding="0" AllowSorting="True"
                                AutoGenerateColumns="False" Width="100%" BorderWidth="0">
                                <Columns>
                                    <asp:TemplateColumn>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkChecked" runat="server"></asp:CheckBox>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn HeaderText="FileName" SortExpression="fileName">
                                        <ItemTemplate>
                                            &nbsp;
                                            <asp:PlaceHolder ID="plhImgEdit" runat="server"></asp:PlaceHolder>
                                            <asp:Image ID="imgType" runat="server" BorderWidth="0" BorderStyle="None"></asp:Image>
                                            <asp:LinkButton ID="lnkName" CssClass="FileManager" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"filename") %>'
                                                CommandName="ItemClicked" CausesValidation="false">
                                            </asp:LinkButton>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            &nbsp;
                                            <asp:PlaceHolder ID="plhImgEdit" runat="server"></asp:PlaceHolder>
                                            <asp:Image ID="imgType" runat="server" BorderWidth="0" BorderStyle="None"></asp:Image>
                                            <asp:TextBox ID="txtEditName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"filename") %>'>
                                            </asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:BoundColumn DataField="size" SortExpression="size" ReadOnly="True" HeaderText="Size (KB)">
                                        <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="Right"></ItemStyle>
                                    </asp:BoundColumn>
                                    <asp:BoundColumn DataField="modified" SortExpression="modified" ReadOnly="True" HeaderText="Modified">
                                        <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="Right"></ItemStyle>
                                    </asp:BoundColumn>
                                    <asp:TemplateColumn ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit" CausesValidation="false"
                                                Text="Rename"></asp:LinkButton>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Update" Text="Update"></asp:LinkButton>&nbsp;
                                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Cancel" CausesValidation="false"
                                                Text="Cancel"></asp:LinkButton>
                                        </EditItemTemplate>
                                    </asp:TemplateColumn>
                                </Columns>
                                <HeaderStyle BackColor="#D4D0C8" ForeColor="#000000"></HeaderStyle>
                            </asp:DataGrid></td>
                    </tr>
                    <tr bgcolor="#d4d0c8">
                        <td>
                            <asp:Label ID="lblCounter" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblError" runat="server" ForeColor="red"></asp:Label></td>
                    </tr>
                </table>
                <br>
                <table cellspacing="0" cellpadding="2" width="50%" border="0">
                    <tr>
                        <td width="45%">
                            <b>Create New Directory :</b>
                        </td>
                        <td>
                            <asp:TextBox ID="txtNewDirectory" runat="server" EnableViewState="False"></asp:TextBox><asp:ImageButton
                                ID="Imagebutton1" AlternateText="New Folder" ImageUrl="images/Comments.gif"
                                runat="server"></asp:ImageButton></td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <b>Upload File (You can upload up to 3 files at the same time)</b></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <input id="file1" type="file" name="file1" runat="server"><br>
                            &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick="btnUpload_Click">
                            </asp:Button></td>
                    </tr>
                </table>
            </b>
        </div>
    </form>
</body>
</html>
